import asyncio
import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), "/root/work/arcfox-crawler"))

from com.arcfox.school.spider.yzy.yzy_university_enroll_info_spider import YZYUniversityEnrollInfoSpider
from com.arcfox.school.spider.yzy.yzy_school_img_spider import YZYSchoolImgSpider
from com.arcfox.school.spider.yzy.yzy_school_list_spider import YZYSchoolListSpider
from loguru import logger

from com.arcfox.school.processor.sun.sun_enrollment_plan_processor import SunEnrollmentPlanProcessor
from com.arcfox.school.spider.sun.sun_enrollment_plan_spider import SunEnrollmentPlanSpider

from com.arcfox.util.util import add_log


class SungaokaoEnrollInfoService:
    def __init__(self):
        self.university_enroll_info_spider = SunEnrollmentPlanSpider()
        add_log(self.__class__.__name__ + ".log")

    async def start(self):
        logger.info("爬取阳光高考招生简章, 准备招生简章")
        await self.university_enroll_info_spider.start_crawl()
        logger.info("准备招生简章抓取完成")


if __name__ == "__main__":
    asyncio.run(SungaokaoEnrollInfoService().start())
